﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="dashboard_agent.aspx.cs" Inherits="agent_dashboard_agent" %>

<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Collections" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
 <link rel="shortcut icon" type="image/jpg" href="../images/logo/logo_feas.jpg" />
<title>Real estate</title>
<script src="../js/html5.js"></script>
<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript" src="../js/jquery-1.8.0.js"></script>
<script type="text/javascript" src="../js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="../js/utility.js"></script>
<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap-modal.js"></script>
<link rel="stylesheet" type="text/css" href="../css/metro-bootstrap.css"/>
    <link rel="stylesheet" href="../docs/font-awesome.css"/>
<!--<script type="text/javascript" src="../js/sticky_footer.js"></script>-->
<link rel="stylesheet" type="text/css" href="../css/master.css" />
<link rel="stylesheet" type="text/css" href="../css/dropBox.css"/>
<link rel="stylesheet" type="text/css" href="../css/menu.css"/>
<link rel="stylesheet" type="text/css" href="../css/tooltip.css"/>
<link rel="stylesheet" type="text/css" href="../css/buttons.css"/>
<script type="text/javascript" 
        src="http://www.google.com/jsapi"></script>
<script type="text/javascript">

    // Initialize version 1.0 of Google AJAX API
    google.load("language", "1");

    function translate(lang) {
        var source = document.getElementById("article").innerHTML;
        var len = content.length;

        // Google Language API accepts 500 characters per request 
        var words = 500;

        // This is for English pages, you can change the
        // sourcelang variable for other languages
        var sourcelang = "en";
        document.getElementById("translation").innerHTML = "";

        for (i = 0; i <= (len / words); i++) {
            google.language.translate(source.substr(i * words, words),
                 "en", lang, function (result) {
                     if (!result.error) {
                         document.getElementById("translation").innerHTML
           = document.getElementById("translation").innerHTML
           + result.translation;
                     }
                 });
        }

        // Hide the text written in the original language
        document.getElementById("article").style.display = 'none';
        return false;
    }

    // Switch to the original language

    function original() {
        document.getElementById("translation").style.display = 'none';
        document.getElementById("article").style.display = 'block';
        return false;
    }
</script>

    <script type="text/javascript">

        $(document).ready(function () {


            $.countNewEmail();
        });
        $.countNewEmail = function () {

            $.post("notify.aspx", {

                requestFrom: "countNewEmail"
            },
function (data, status) {
    $("span#Email_info_count1").html(data);
});
        };
</script>

 

 

</head>
<%
    int i;
    %>

<body>
    
<form id="form1" runat="server">
    <div id="wrapper"><asp:Label ID="Label5" runat="server" Text="Label" Visible="false"></asp:Label>
<div id="header"><a href="#"> <img src="../images/logo/logo_feas.png" alt="Logo" style="margin-top:7px;margin-left:7px;float:left;"> <img src="../images/logo/logo_feas2.png" alt="Logo" class="logo"></a>
    <div id="metaphors" align="right">
     
     
     
    
      

      <li id="btntheme"><a href="#"><span class="theme_icon"></span>Theme<span class="arrow"></span></a></li>
      <img src="../images/face1.png" class="user_icon">
      <li id="btnUser"><a href="#">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:label ID="Label1" runat="server" text="Label"></asp:label><span class="arrow"></span></a></li>
       <li><span class="logout_icon"></span>
        <asp:LinkButton ID="LinkButton1" runat="server" onclick="LinkButton1_Click">Logout</asp:LinkButton></li>
      <div id="box3" class="outerbox">
        <div id="box_inner3" class="innerbox">
          <asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
        </div>
      </div>
      <div id="box2" class="outerbox">
        <div id="box_inner3" class="innerbox">
          <div class="user_option"><img src="../images/icons/user.png" class="opt_icon">alert</div>
          <div class="user_option"><img src="../images/icons/pencil.png" class="opt_icon">alert</div>
        </div>
      </div>
      <div id="box1" class="outerbox">
        <div id="box_inner1" class="innerbox">
          <div class="user_option1">
            <h4 class="opt_heading">Menu Bar</h4>
            <span id="show_menu" class="style">on</span><span id="hide_menu" class="style2">off</span></div>
        </div>
      </div>
      <div id="box" class="outerbox">
        <div id="box_inner" class="innerbox">
          <div class="user_option"><img src="../images/icons/user.png" class="opt_icon">Edit Profile</div>
          <div class="user_option"><img src="../images/icons/pencil.png" class="opt_icon">Change Password</div>
        </div>
      </div>
    </div>
    <!--End of the metaphor tag--> 
    
  </div>
  <!--End of the Header tag-->
  
  <div id="contentliquid">
 <div id="content">
      <div id="titalbar">
        <h1>Dashboard</h1>
        
      </div>
      <h1 style="font-size:24px; color:#A00; padding-top:10px; padding-bottom:15px; padding-left:25px">Welcome 
          <asp:Label ID="Label3" runat="server"></asp:Label></h1>
      
      <div>
      
      
          <table  style="text-align:center;">
              <tr>
                  <td>
                      <ul class="thumbnails">
    <li class="span3 tile tile-double tile-orange" style="width:350px; margin-left:100px; background-color:#4C2C66">
        <a href="agent_Add_request.aspx" ><img src="../images/icons/request.png">
            <h1 style="margin-top:40px; font-size:18px">Requests</h1>
        </a>
    </li>
    <li class="span3 tile" style="width:170px; margin-left:50px; background-color:#FF2E12" >
        <a href="AgentProfileUpdate.aspx" ><img src="../images/icons/Client_Male_Light.png">
            <h1 style="margin-top:40px; font-size:18px">Profile</h1>
        </a>
    </li>
</ul></td>
              </tr>
              <tr>
                  <td>
                      &nbsp;</td>
              </tr>
              <tr>
                  <td>
                                    <ul class="thumbnails"> 
                                    <li class="span3 tile" style="width:170px; margin-left:100px; background-color:#FF981D">
        <a href="clients.aspx" ><img src="../images/icons/report.png">
            <h1 style="margin-top:40px; font-size:18px">Reports</h1>
        </a>
    </li>       <asp:Panel ID="Panel1" runat="server" Visible ="false">

    <li class="span3 tile tile-double tile-orange" style="width:350px; margin-left:50px;background-color:#128425">
        <a href="reminder.aspx" ><img src="../images/icons/rem.png">
             <h1 style="margin-top:40px; font-size:18px">Reminder</h1>
                <asp:Label ID="Label6" runat="server" Visible ="false"></asp:Label>
                     <asp:Label ID="Label7" runat="server" Visible="false"></asp:Label>
               </h1>
        </a>
    </li>
                                           </asp:Panel>
</ul></td>
              </tr>
          </table>
      
      

         
       <!-- Main Menu -->
        
            
    </div>
    </div>

  
      
  </div>
      
  </div>

<div id="leftcolumn">
 <div id="leftcolumn_top">
  <%  SqlConnection con = null;
        con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnStr"].ConnectionString);
      con.Open();
      SqlCommand cmd = new SqlCommand("SELECT * FROM request5 where status1='0'", con);
      
      SqlDataReader dr = cmd.ExecuteReader();
      int i = 0;
    

      while (dr.Read())
      {
         
          i = i + 1;

         // Response.Write("<span style=\"border-bottom:1px solid #CCC;width:100%;padding:5px;\">");
        

      

         
      }

   
    
      dr.Close();
      con.Close(); %>

       <%  SqlConnection con1 = null;
        con1 = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnStr"].ConnectionString);
      con1.Open();
      SqlCommand cmd1 = new SqlCommand("SELECT * FROM message1 where status_='0'", con1);
      
      SqlDataReader dr1 = cmd1.ExecuteReader();
      int a = 0;
    

      while (dr1.Read())
      {
         
          a = a+ 1;

         // Response.Write("<span style=\"border-bottom:1px solid #CCC;width:100%;padding:5px;\">");
        

      

         
      }

   
    
      dr1.Close();
      con1.Close(); %>
   <%--   <div id="addtask" runclass="modal hide fade in" style="display: none; ">
        <div class="modal-header"> <a class="close" data-dismiss="modal">x</a>
          <h1 style="font-size:15px;padding:7px;font-weight:bold;">Notification's</h1>
        </div>
        <div class="modal-body">
        <table id="tbl_task" class="model_popup_desgin">
  <tr>
    <td><p> You have a recent&nbsp;&nbsp<%=i%>&nbsp;&nbsp;update on date</p></td>
  </tr>
  <tr>
     
   
  </tr>
  <tr>
      
  </tr>
  <tr>
    <td></td>
  </tr>
</table>

          
        </div>--%>
         <div id="addtask" class="modal hide fade in" style="display: none; ">
        <div class="modal-header">  <a class="close" data-dismiss="modal">x          <h1 style="font-size:15px;padding:7px;font-weight:bold;">Updates</h1>  </div>
        <div class="modal-body">
        <table id="tbl_task" class="model_popup_desgin">
  <tr>
    <td><p> You have a recent&nbsp;&nbsp<%=i%>&nbsp;&nbsp;update on date</p></td>
  </tr>
  <tr>
     
   
  </tr>
  <tr>
      
  </tr>
  <tr>
    <td></td>
  </tr>
</table>

          
        </div>
        <div class="modal-footer">  <asp:Button ID="Button2" runat="server" Text="cancel" 
                CssClass="btn btn-success" Visible="False" />
            <asp:Button ID="Button1" runat="server" Text="View" CssClass="btn btn-success" 
                onclick="Button1_Click" Visible="False" /> <p><a data-toggle="modal" href="#addtask1" class="btn btn-success" style="font-weight:bold;"><img src="../images/icons/task.png" style="margin-right:7px;" />View</a></p></div>
      </div>
      <div id="Div1" class="modal hide fade in" style="display: none; ">
        <div class="modal-header"> <a class="close" data-dismiss="modal">x</a>
          <h1 style="font-size:15px;padding:7px;font-weight:bold;">Notification's</h1>
        </div>
        <div class="modal-body">
        <table id="Table1" class="model_popup_desgin">
  <tr>
    <td><p> You have a recent&nbsp;&nbsp<%=a%>&nbsp;&nbsp;Messages</p></td>
  </tr>
  <tr>
     
   
  </tr>
  <tr>
      
  </tr>
  <tr>
    <td></td>
  </tr>
</table>

          
        </div>
        <div class="modal-footer">  <asp:Button ID="Button5" runat="server" Text="cancel" 
                CssClass="btn btn-success" Visible="False" />
            <asp:Button ID="Button6" runat="server" Text="View" CssClass="btn btn-success" 
                onclick="Button1_Click" Visible="False" /> <p><a data-toggle="modal" href="#Div2" class="btn btn-success" style="font-weight:bold;"><img src="../images/icons/task.png" style="margin-right:7px;" />View</a></p></div>
      </div>
       <div id="addtask1" class="modal hide fade in" style="display: none; ">
        <div class="modal-header"> <a class="close" data-dismiss="modal">x</a>
          <h1 style="font-size:15px;padding:7px;font-weight:bold;">Notification's</h1>
        </div>
        <div class="modal-body">
        

    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataSourceID="SqlDataSource3" CssClass ="mGrid " onrowcommand="GridView1_RowCommand" >
        <Columns>
            <asp:BoundField DataField="r_id" HeaderText="Request ID" SortExpression="r_id" />
            <asp:BoundField DataField="added" HeaderText="Added By" SortExpression="added" />
        <asp:ButtonField ButtonType="Image" CommandName="active" HeaderText="View" ImageUrl="../images/icons/cross.png"
              Text="View" />
        </Columns>
       
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
        ConnectionString="<%$ ConnectionStrings:real_estateConnectionString %>" 
        SelectCommand="SELECT [r_id], [added] FROM [request5]  WHERE ([status1] = @status1) ">
        <SelectParameters>
            <asp:ControlParameter ControlID="Label2" Name="status1" PropertyName="Text" 
                Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server"></asp:SqlDataSource>
    <br />
    <br />
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"></asp:SqlDataSource>

          
        </div>
        <div class="modal-footer">  <asp:Button ID="Button3" runat="server" Text="cancel" CssClass="btn btn-success" />
            <asp:Button ID="Button4" runat="server" Text="Done" CssClass="btn btn-success" 
                onclick="Button1_Click" /></div>
      </div>
       <div id="Div2" class="modal hide fade in" style="display: none; ">
        <div class="modal-header"> <a class="close" data-dismiss="modal">x</a>
          <h1 style="font-size:15px;padding:7px;font-weight:bold;">Notification's</h1>
        </div>
        <div class="modal-body1">
        
<div style="margin-left :80px;">
    <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
        DataSourceID="SqlDataSource1">
        <Columns>
            <asp:BoundField DataField="email" HeaderText="email" SortExpression="email" />
            <asp:BoundField DataField="p_id" HeaderText="p_id" SortExpression="p_id" />
            <asp:BoundField DataField="ph_no" HeaderText="ph_no" SortExpression="ph_no" />
            <asp:BoundField DataField="address" HeaderText="address" 
                SortExpression="address" />
            <asp:BoundField DataField="message" HeaderText="message" 
                SortExpression="message" />
            <asp:BoundField DataField="date_" HeaderText="date_" SortExpression="date_" />
        </Columns>
    </asp:GridView>
    <asp:Label ID="Label4" runat="server" Text="Label"></asp:Label>
    <asp:SqlDataSource ID="SqlDataSource4" runat="server" 
        ConnectionString="<%$ ConnectionStrings:real_estateConnectionString %>" 
        SelectCommand="SELECT [email], [p_id], [ph_no], [address], [message], [date_] FROM [message1] WHERE ([status_] = @status_)">
        <SelectParameters>
            <asp:ControlParameter ControlID="Label5" Name="status_" PropertyName="Text" 
                Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
          </div>
        </div>
        <div class="modal-footer">  <asp:Button ID="Button7" runat="server" Text="cancel" CssClass="btn btn-success" />
            <asp:Button ID="Button8" runat="server" Text="Done" CssClass="btn btn-success" 
                onclick="Button1_Click" /></div>
      </div>
 </div>
     <ul id="nav">
      <li><a href="dashboard_agent.aspx"><img src="../images/icons/home.png" class="menu_icon">Dashboard</a> </li>
     
    
      <li><a href="#"><img src="../images/icons/forms.png" class="menu_icon"> Requests Details</a>
        <ul>
          <li><a href="agent_Add_request.aspx">Requests </a></li>
      
       
        </ul>
      </li>
      <li><a href="#"><img src="../images/icons/forms.png" class="menu_icon">Profile Management</a>
        <ul> <li><a href="AgentProfileUpdate.aspx"> My Profile</a></li>
        </ul>
      </li>
      <li><a href="#"><img src="../images/icons/id.png" class="menu_icon">Reports</a><ul>
              <li><a href="clients.aspx" ><img src="../images/icons/plus.png" class="menu_icon">Clients</a></li>
          <li><a href="property_to_sell_buy.aspx" ><img src="../images/icons/pencil.png" class="menu_icon">Properties to sell/buy/rent</a></li>
          <li><a href="agent_request_report.aspx" ><img src="../images/icons/zoom.png" class="menu_icon">Requests</a></li>
          <li><a href="agent_property_search.aspx" ><img src="../images/icons/pages.png" class="menu_icon">Search properties</a></li>
   
        </ul>
      </li>
     
      
    </ul>
  </div>
  


 


   <div id="footer">
    <p> Copyright &copy; 2013. II technology  </div>

</div>
</form>
</body>
</html>